109 research outputs found

    Adding Reference Immutability to Scala

    Get PDF
    Scala is a multi-paradigm programming language combining the power of functional and object-oriented programming. While Scala has many features promoting immutability, it lacks a built-in mechanism for controlling and enforcing reference immutability. Reference immutability means the state of an object and all other objects reachable from it cannot be mutated through an immutable reference. This thesis presents a system for reference immutability in Scala, along with a simple implementation in the Dotty (Scala 3) compiler. By extending the Scala type system and encoding mutability as types within annotations, my system enables tracking and enforcing reference immutability for any type. It addresses challenges such as the complexities of the Scala type system and context sensitivity with nested classes and functions. The design offers binary compatibility with existing Scala code, and promotes predictable object behavior, reducing the risk of bugs in software development

    Scala with Explicit Nulls

    Get PDF
    The Scala programming language makes all reference types implicitly nullable. This is a problem, because null references do not support most operations that do make sense on regular objects, leading to runtime errors. In this paper, we present a modification to the Scala type system that makes nullability explicit in the types. Specifically, we make reference types non-nullable by default, while still allowing for nullable types via union types. We have implemented this design for explicit nulls as a fork of the Dotty (Scala 3) compiler. We evaluate our scheme by migrating a number of Scala libraries to use explicit nulls. Finally, we give a denotational semantics of type nullification, the interoperability layer between Java and Scala with explicit nulls. We show a soundness theorem stating that, for variants of System F_? that model Java and Scala, nullification preserves values of types

    Scala with Explicit Nulls (Artifact)

    Get PDF
    This artifact is a companion to the paper "Scala with Explicit Nulls", where we present a modification to the Scala type system that makes nullability explicit in the types. Specifically, we make reference types non-nullable by default, while still allowing for nullable types via union types. The artifact contains an implementation of this new type system design as a fork of the Dotty (Scala 3) compiler. Additionally, the artifact contains the source code of multiple Scala libraries that we used to evaluate our design

    Experimental Evaluation for an Extremum Seeking Control Strategy based on Input-output Correlation with a Mini-split Air Conditioning System

    Get PDF
    Extremum Seeking Control (ESC) has emerged as a model-free real-time optimization framework, typically based on dither-demodulation driven gradient estimation. However, such conventional ESC suffers from slow convergence. Salsbury et al. have recently proposed an input-output correlation based ESC (IOC-ESC) strategy anchored on a statistical analysis. The IOC-ESC algorithm is less sensitive to changes in its internal parameters because of the use of a normalized correlation coefficient in the feedback loop. The design goal of the algorithm is to have only two tunable parameters: (1) a time scale parameter that relates to the time open loop time constant of the system; and (2) the amplitude of the dither signal. A suitable set of generic internal parameters is still in the process of being identified as more test data become available from different system types. For the work reported here, the feedback gain (referred to as the tuning factor) with the IOC-ESC was also tuned for optimal performance. This study aims to conduct an experimental evaluation for the IOC-ESC strategy with a ductless mini-split air conditioning system, compared with conventional ESC (CON-ESC). The system features variable-capacity compressor operation and variable-speed operation for the evaporator and condenser fans. In this study, both single-input and two-input ESC scenarios are tested. The manipulated inputs include the evaporator and condenser fan speeds, while the total power consumption is used as feedback for all cases. The experimental setup is developed with a 9000 BTU variable-speed mini-split AC system serving a 4’x8’x6’ insulated chamber, and an electrical fan heater is used to provide an artificial heat load. The data acquisition and control algorithms are implemented on a National Instruments CompactRIO platform. Both IOC-ESC and CON-ESC are tested with the same setup. For single-input scenario, the manipulated input is the condenser fan speed. The testing results of five trials of IOC-ESC are used to evaluate the impact of the two tuning parameters, i.e. dither frequency and tuning factor, on the ESC performance. IOC-ESC#1, IOC-ESC#4 and IOC-ESC#5 have the same dither frequency but different tuning factors, while IOC-ESC#1, IOC-ESC#2 and IOC-ESC#3 have the same tuning factor but different dither frequencies. The testing results of two trials of CON-ESC are then compared with the IOC-ESC results. Both CON-ESC and IOC-ESC can effectively reduce the power consumption of the mini-split system without sacrificing zone temperature regulation. Moreover, the settling time of IOC-ESC ranges from 300 to 600 seconds, while the settling time of CON-ESC ranges from 900 to 1200 seconds. Overall, the IOC-ESC converges faster than the CON-ESC. For two-input scenario, the manipulated inputs are condenser fan speed and evaporator fan speed. The testing results of the two-input IOC-ESC are compared with the result of a two-input CON-ESC trial by Yan et al. with the same system. The settling times for CON-ESC and IOC-ESC are about 1800 and 1200 seconds, respectively. In summary, both CON-ESC and IOC-ESC can optimize the condenser fan speed and evaporator fan speed for energy efficient operation, while the IOC-ESC converges faster and has fewer tuning parameters

    Qualifying System F-sub

    Full text link
    Type qualifiers offer a lightweight mechanism for enriching existing type systems to enforce additional, desirable, program invariants. They do so by offering a restricted but effective form of subtyping. While the theory of type qualifiers is well understood and present in many programming languages today, polymorphism over type qualifiers is an area that is less examined. We explore how such a polymorphic system could arise by constructing a calculus System F<:Q which combines the higher-rank bounded polymorphism of System F<: with the theory of type qualifiers. We explore how the ideas used to construct System F<:Q can be reused in situations where type qualifiers naturally arise -- in reference immutability, function colouring, and capture checking. Finally, we re-examine other qualifier systems in the literature in light of the observations presented while developing System F<:Q.Comment: 24 page

    STAT3 potentiates RNA polymerase I-directed transcription and tumor growth by activating RPA34 expression

    Get PDF
    Background: Deregulation of either RNA polymerase I (Pol I)-directed transcription or expression of signal transducer and activator of transcription 3 (STAT3) correlates closely with tumorigenesis. However, the connection between STAT3 and Pol I-directed transcription hasn’t been investigated. Methods: The role of STAT3 in Pol I-directed transcription was determined using combined techniques. The regulation of tumor cell growth mediated by STAT3 and Pol I products was analyzed in vitro and in vivo. RNAseq, ChIP assays and rescue assays were used to uncover the mechanism of Pol I transcription mediated by STAT3. Results: STAT3 expression positively correlates with Pol I product levels and cancer cell growth. The inhibition of STAT3 or Pol I products suppresses cell growth. Mechanistically, STAT3 activates Pol I-directed transcription by enhancing the recruitment of the Pol I transcription machinery to the rDNA promoter. STAT3 directly activates Rpa34 gene transcription by binding to the RPA34 promoter, which enhances the occupancies of the Pol II transcription machinery factors at this promoter. Cancer patients with RPA34 high expression lead to poor survival probability and short survival time. Conclusion: STAT3 potentiates Pol I-dependent transcription and tumor cell growth by activating RPA34 in vitro and in vivo

    Improvement of resistance to rice blast and bacterial leaf streak by CRISPR/Cas9-mediated mutagenesis of Pi21 and OsSULTR3;6 in rice (Oryza sativa L.)

    Get PDF
    Rice (Oryza sativa L.) is a staple food in many countries around the world, particularly in China. The production of rice is seriously affected by the bacterial leaf streak and rice blast, which can reduce rice yield or even cause it to fail to be harvested. In this study, susceptible material 58B was edited by CRISPR/Cas9, targeting a target of the Pi21 gene and a target of the effector-binding element (EBE) of the OsSULTR3;6 gene, and the mutants 58b were obtained by Agrobacterium-mediated method. The editing efficiency of the two targets in the T0 generation was higher than 90.09%, the homozygous mutants were successfully selected in the T0 generation, and the homozygous mutation rate of each target was higher than 26.67%. The expression of the edited pi21 and EBE of Ossultr3;6 was significantly reduced, and the expression of defense responsive genes was significantly upregulated after infected with rice blast. The lesion areas of rice blast and bacterial leaf streak were significantly reduced in 58b, and the resistance of both was effectively improved. Furthermore, the gene editing events did not affect the agronomic traits of rice. In this study, the resistance of 58b to rice blast and bacterial leaf streak was improved simultaneously. This study provides a reference for using Clustered Regularly Interspaced Short Palindromic Repeats/Cas9 (CRISPR/Cas9) to accelerate the improvement of rice varieties and the development of new materials for rice breeding

    PyPose: A Library for Robot Learning with Physics-based Optimization

    Full text link
    Deep learning has had remarkable success in robotic perception, but its data-centric nature suffers when it comes to generalizing to ever-changing environments. By contrast, physics-based optimization generalizes better, but it does not perform as well in complicated tasks due to the lack of high-level semantic information and the reliance on manual parametric tuning. To take advantage of these two complementary worlds, we present PyPose: a robotics-oriented, PyTorch-based library that combines deep perceptual models with physics-based optimization techniques. Our design goal for PyPose is to make it user-friendly, efficient, and interpretable with a tidy and well-organized architecture. Using an imperative style interface, it can be easily integrated into real-world robotic applications. Besides, it supports parallel computing of any order gradients of Lie groups and Lie algebras and 2nd2^{\text{nd}}-order optimizers, such as trust region methods. Experiments show that PyPose achieves 3-20×\times speedup in computation compared to state-of-the-art libraries. To boost future research, we provide concrete examples across several fields of robotics, including SLAM, inertial navigation, planning, and control

    PyPose v0.6: The Imperative Programming Interface for Robotics

    Full text link
    PyPose is an open-source library for robot learning. It combines a learning-based approach with physics-based optimization, which enables seamless end-to-end robot learning. It has been used in many tasks due to its meticulously designed application programming interface (API) and efficient implementation. From its initial launch in early 2022, PyPose has experienced significant enhancements, incorporating a wide variety of new features into its platform. To satisfy the growing demand for understanding and utilizing the library and reduce the learning curve of new users, we present the fundamental design principle of the imperative programming interface, and showcase the flexible usage of diverse functionalities and modules using an extremely simple Dubins car example. We also demonstrate that the PyPose can be easily used to navigate a real quadruped robot with a few lines of code
    • …
    corecore